package descentFly.app.dialogs
{
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	
	import descentFly.app.df_modalLayer;
	
	import flash.events.Event;

	public class df_editLoginWindow extends df_baseLoginWindow {
		public function df_editLoginWindow(parent: df_modalLayer, descr: String='') {
			super(parent, descr);
			title.text = locale.EDITLOGINTITLE;
		}
		
		override protected function getValues(): Object {
			if (!dfApp.player) 
				return super.getValues();
			return {
				login		: dfApp.player.options.login,
				password	: ''
			}
		}
		
		override protected function loginComplete(a_login: String, a_passwordEncrypt: String): void {
			dfApp.player.updateLoginPassword(a_login, a_passwordEncrypt);
			close();
		}
	}
}